import axios from 'axios'
export function request(config) {
		// 1.创建axios的实例
		const instance = axios.create({
			baseURL: 'http://152.136.185.210:8000/api/n3',
			timeout: 5000
		})
		// 配置请求和响应拦截
		instance.interceptors.request.use(config => {
			return config
		}, err => {
			// console.log('来到了request拦截failure中')
        })
        instance.interceptors.response.use(res => {
			// console.log('来到了response拦截success中');
			return res.data
		}, err => {
            //console.log(err);
        })
        return instance(config)
}